﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using Misuzilla.Net.Irc;
using Misuzilla.Crigate.Handler;
using Misuzilla.Crigate.Contexts;

namespace Misuzilla.Crigate
{
    [ActivateContext(ActivateContexts.SessionStarted)]
    [SharedAppDomain("Console")]
    public class ConsoleHandler : Console, IHandler
    {
        #region IHandler メンバ
        public override void Initialize(Session session)
        {
            base.Initialize(session);

            Attach("#Console", typeof(RootContext), true);
//            RegisterContext<RootContext>();
//            RegisterContext<ConfigContext>();
//            RegisterContext<FilterContext>();
//            RegisterContext<GroupContext>();
            RegisterContext<SystemContext>();
        }

        public override void Uninitialize()
        {
            Detach();
            base.Uninitialize();
        }
        #endregion
    }
}
